Industrial controllers have been used for many years in industrial control applications. The advent of the industrial controller allowed the replacement of electromechanical relay panels, used for on-off sequencing of industrial devices, by solid-state power modules. Today, the industrial controller has evolved to include capabilities to perform data acquisition and storage, to execute complex mathematical algorithms, and to perform system troubleshooting, to name a few.
The industrial controller is programmed by storing instructions into an internal memory circuit. Some controllers are programmed by entering the instructions using a keyboard on a control panel. Many modern controllers are programmed using a host computer equipped with a suitable software package. Using the suitable software, high-level instructions of a source program are entered into the host computer and compiled to form a control program. The control program is transferred to the controller either by a communication link between the controller and the computer, or by storing the control program in a non-volatile memory for physical transfer to the controller.
Some current systems use the host computer for accepting instructions in a high-level language for compilation into the control program for transfer to the controller. Other systems accept instructions in a ladder-based language for compilation into the control program. Further, some systems convert instructions in the ladder-based language to corresponding instructions in the high-level language so that the high-level language instructions can be compiled to form the control program.
Regardless of the specific language employed in creating the source program, it is desirable for an editor operating within the host computer to be capable of displaying a ladder diagram representative of a portion of the source program. In prior methods of displaying a ladder diagram, the width of each element of the ladder diagram is fixed by software running in the host computer. This width is usually measured in terms of a maximum number of characters allowed for describing an element of the ladder diagram. In practice, however, very few elements of a ladder diagram are described using the maximum number of characters. Therefore, rungs of a ladder diagram containing many elements cannot be fully displayed during the editing process. Also, limiting the number of characters used in describing an element to a maximum value does not allow for a long description which may be occasionally desired by a programmer.
Once programmed, the industrial controller repeatedly scans, or polls input devices coupled thereto for logically determining control actions for an output device. The scanning, or polling, is repeated frequently in order to detect changes in the state of the input devices. The step of scanning is performed by examining the status of all of the devices, followed by storing each status in a corresponding memory location. One measure of the performance of an industrial controller is the time required to perform the step of scanning.
Many industrial controllers currently include communication interfaces to allow communication with other controllers, the host computer, and other general peripherals. For example, a network of many controllers can be interfaced for the purpose of distributed processing. Regardless of the design of the network and the interfaces, an error in the transmission of digital data is inevitable. Potential causes of digital data transmission error include attenuation distortion, delay distortion, and noise. In practice, it is common to append each transmission of digital data with a number of redundant check bits for the purpose of error detection. The originator of the message computes these bits as a function of the preceding bits in the transmission. Upon receiving the appended transmission, a recipient performs the same computation and accepts the transmission as being error-free only if the received check bits are the same as those computed.
A widely used technique for error detection employs a cyclic redundancy check. In a cyclic redundancy check algorithm, the bits of a transmission are treated as successive coefficients of a polynomial over the binary field, and the check bits are chosen so that this polynomial is exactly divisible by a preselected polynomial that is a parameter of the algorithm. The cyclic redundancy check technique of error detection has several proven, desirable properties with regard to the types and number of errors which are detectable. However, cyclic redundancy check bits are not efficiently computed in software because of their orientation to polynomials over the binary field.
A class of error detection codes which are efficiently computable by software is an arithmetic redundancy check. In an arithmetic redundancy check algorithm, the check bits are formed using integer arithmetic operations on the bits of a transmission. Unfortunately, the error detecting properties of the arithmetic redundancy check are not quite as good as those of a cyclic redundancy check. However, a specific arithmetic redundancy check whose computation time rivals that of the cyclic redundancy check is known as a Fletcher checksum. A full discussion of the details and properties of the Fletcher checksum is given in "An Arithmetic Checksum For Serial Transmissions", IEEE TRANSACTIONS ON COMMUNICATIONS, Vol. COM-30, No. 1, pp. 247-251, January 1982.